type
  Gender = enum
    Male, Female
  Person = ref object
    case gender:Gender
    of Male:
      girlFriends: int
    of Female:
      boyFriends: int

var p1=Person(gender:Male, girlFriends:2)
var p2=Person(gender:Female, boyFriends:3)

echo p1[]
echo p2[]
